package minh.bac.wcbrazil2014.adapter;

import java.util.ArrayList;

import minh.bac.wcbrazil2014.WCTAG;
import minh.bac.wcbrazil2014.listviewmatch.ListViewFragment;

import com.viewpagerindicator.IconPagerAdapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

public class LichDauVPgerAdapter extends FragmentStatePagerAdapter implements  IconPagerAdapter{

	ArrayList<ListViewFragment> arrayListFM;	
	public LichDauVPgerAdapter(FragmentManager fm, ArrayList<ListViewFragment> arrayListFM) {
		super(fm);
		// TODO Auto-generated constructor stub
		this.arrayListFM = arrayListFM;
	}

	@Override
	public int getIconResId(int index) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public Fragment getItem(int position) {
		// TODO Auto-generated method stub
		return arrayListFM.get(position);
	}
	
	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return arrayListFM.size();
	}
	@Override
	public CharSequence getPageTitle(int position) {
		// TODO Auto-generated method stub
		return WCTAG.TITLE_LICHDAU[position % WCTAG.TITLE_LICHDAU.length];
	}
	

}
